* lisp/vc/vc.el (vc-print-root-log): Always set `default-directory'
authorDmitry Gutov <dgutov@yandex.ru>
Thu, 24 Oct 2013 01:27:29 +0000 (05:27 +0400)
committerDmitry Gutov <dgutov@yandex.ru>
Thu, 24 Oct 2013 01:27:29 +0000 (05:27 +0400)
value, whether we could auto-deduce `backend', or not.

lisp/ChangeLog
lisp/vc/vc.el

index 535f5ae18319ad8773a54ee15634ad956bf7f2c6..e7e2f7f39a34e3bfb130ca1e36331a6da555ae3e 100644 (file)
@@ -1,5 +1,8 @@
 2013-10-24  Dmitry Gutov  <dgutov@yandex.ru>
 
+       * vc/vc.el (vc-print-root-log): Always set `default-directory'
+       value, whether we could auto-deduce `backend', or not.
+
        * progmodes/ruby-mode.el (ruby-smie-rules): Fix the "curly block
        with parameters" example.  Simplify the "is it block or is it
        hash" check, but also make it more thorough.
index 585b6d48d45f627123b580c219879a88fc8ed0a8..11cfeb403d4b453b7b3b8b5eac53ed212ca7506c 100644 (file)
@@ -2330,10 +2330,10 @@ When called interactively with a prefix argument, prompt for LIMIT."
        (setq rootdir (vc-call-backend backend 'root default-directory))
       (setq rootdir (read-directory-name "Directory for VC root-log: "))
       (setq backend (vc-responsible-backend rootdir))
-      (if backend
-         (setq default-directory rootdir)
-       (error "Directory is not version controlled")))
-    (setq working-revision (vc-working-revision rootdir))
+      (unless backend
+        (error "Directory is not version controlled")))
+    (setq working-revision (vc-working-revision rootdir)
+          default-directory rootdir)
     (vc-print-log-internal backend (list rootdir) working-revision nil limit)))
 
 ;;;###autoload